//
//  AppDelegate.m
//  XMMusicTest
//
//  Created by sfk-ios on 2017/7/10.
//  Copyright © 2017年 sfk-JasonSu. All rights reserved.
//

#import <AVFoundation/AVFoundation.h>
#import "AppDelegate.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    // 告诉app支持后台播放
    AVAudioSession *audioSession = [AVAudioSession sharedInstance];
    [audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
    [audioSession setActive:YES error:nil];
    
    return YES;
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
    
    [[NSNotificationCenter defaultCenter] postNotificationName:NOTI_BECOME_ACTIVE object:nil];
}



@end
